package com.example.mobifin_busticket;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;



public class AppPreferences {
	private Context mContext;
	SharedPreferences preference;
	Editor editor;
	public AppPreferences(Context context){
		mContext = context;
		preference = context.getSharedPreferences(AppData.appPreferenceName, Context.MODE_PRIVATE);
		editor = preference.edit();
	}
	
	public void setTerminalRequestID(String id){
		editor.putString("TerminalRequestID", id);
		editor.commit();
	}
	
	public String getTerminalRequestID(){
		return preference.getString("TerminalRequestID", null);
	}
	
	public void setTerminalNumber(String number){
		editor.putString("TerminalNumber", number);
		editor.commit();
	}
	
	public String getTerminalNumber(){
		return preference.getString("TerminalNumber", null);
	}
	
	public void setEncryptionKey(String key){
		editor.putString("EncryptionKey", key);
		editor.commit();
	}
	
	public String getEncryptionKey(){
		return preference.getString("EncryptionKey", null);
	}
	
	public void setKycId(String id){
		editor.putString("KycId", id);
		editor.commit();
	}
	
	public String getKycId(){
		return preference.getString("KycId", null);
	}
	
	public void setSessionId(String id){
		editor.putString("SessionId", id);
		editor.commit();
	}
	
	public String getSessionId(){
		return preference.getString("SessionId", null);
	}
	
	public void setEmailAddress(String email){
		editor.putString("Email", email);
		editor.commit();
	}
	
	public String getEmailAddress(){
		return preference.getString("Email", null);
	}
	
	public void setAccountHolderName(String accountHolder){
		editor.putString("AccountHolder", accountHolder);
		editor.commit();
	}
	
	public String getAccountHolderName(){
		return preference.getString("AccountHolder", "");
	}
	public String getIDNumber()
	{
		return preference.getString("IDNumber", null);
	}
	public void setIDNumber(String IDNumber)
	{
		editor.putString("IDNumber", IDNumber);
		editor.commit();
	}
	public String getFirstName()
	{
		return preference.getString("FirstName", null);
	}
	public void setFirstName(String Name)
	{
		editor.putString("FirstName", Name);
		editor.commit();
	}
	
	public String getLastName()
	{
		return preference.getString("LastName", null);
	}
	public void setLastName(String Name)
	{
		editor.putString("LastName", Name);
		editor.commit();
	}
	
	public String getPhone()
	{
		return preference.getString("Phone", null);
	}
	public void setPhone(String Phone)
	{
		editor.putString("Phone", Phone);
		editor.commit();
	}
	public String getCountry()
	{
		return preference.getString("Country", null);
	}
	public void setCountry(String Country)
	{
		editor.putString("Country", Country);
		editor.commit();
	}
	public String getAreaZipCode()
	{
		return preference.getString("AreaZipCode", null);
	}
	public void setAreaZipCode(String AreaZipCode)
	{
		editor.putString("AreaZipCode", AreaZipCode);
		editor.commit();
	}
	public String getState()
	{
		return preference.getString("State", null);
	}
	public void setState(String State)
	{
		editor.putString("State", State);
		editor.commit();
	}
	
	public boolean getTranPinState()
	{
		return preference.getBoolean("TranPinState", false);
	}
	public void setTranPinState(Boolean flag)
	{
		editor.putBoolean("TranPinState", flag);
		editor.commit();
	}
	
	public boolean getTopup_CustMob()//for Topup
	{
		return preference.getBoolean("Topup_CustMob", false);
	}
	public void setTopup_CustMob(Boolean flag)
	{
		editor.putBoolean("Topup_CustMob", flag);
		editor.commit();
	}
	
	public boolean getTopup_CustEmail()
	{
		return preference.getBoolean("Topup_CustEmail", false);
	}
	public void setTopup_CustEmail(Boolean flag)
	{
		editor.putBoolean("Topup_CustEmail", flag);
		editor.commit();
	}
	
	
	public boolean getBillpay_CustMob()//for Billpay
	{
		return preference.getBoolean("Billpay_CustMob", false);
	}
	public void setBillpay_CustMob(Boolean flag)
	{
		editor.putBoolean("Billpay_CustMob", flag);
		editor.commit();
	}
	
	public boolean getBillpay_CustEmail()
	{
		return preference.getBoolean("Billpay_CustEmail", false);
	}
	public void setBillpay_CustEmail(Boolean flag)
	{
		editor.putBoolean("Billpay_CustEmail", flag);
		editor.commit();
	}
	
	public boolean getVoucher_CustMob()//for Voucher
	{
		return preference.getBoolean("Voucher_CustMob", false);
	}
	public void setVoucher_CustMob(Boolean flag)
	{
		editor.putBoolean("Voucher_CustMob", flag);
		editor.commit();
	}
	
	public boolean getVoucher_CustEmail()
	{
		return preference.getBoolean("Voucher_CustEmail", false);
	}
	public void setVoucher_CustEmail(Boolean flag)
	{
		editor.putBoolean("Voucher_CustEmail", flag);
		editor.commit();
	}
	
	public boolean getAppupdationFlag()
	{
		return preference.getBoolean("Flag", false);
	}

	public void setAppupdationFlag(Boolean flag)
	{
		editor.putBoolean("Flag", flag);
		editor.commit();
	}
	
	public boolean getAppUpdateEnableState()
	{
		return preference.getBoolean("AppUpdateEnableState", false);
	}
	public void setAppUpdateEnableState(Boolean flag)
	{
		editor.putBoolean("AppUpdateEnableState", flag);
		editor.commit();
	}
}